export const transObj = (name)=>{
    const info = sessionStorage.getItem(name)
    try{
    info = JSON.parse(info)
    return info 
    }catch{
        return info
    }
}
export const transString =(name,payload)=>{
    if(typeof(payload) == 'object'){
        payload = JSON.stringify(payload)
    }
    sessionStorage.setItem(name,payload)
}